<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='zhyyglhtxt'/></title>

    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {background:#fff;}
    </style>

</head>

<body style="background:white;">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <form:form commandName="user" method="${_method }" class="layui-form">
            <input type="hidden" name="_method" value="${_method }"/>
            <input type="hidden" name="id" value="${user.id }"/>

            <div class="layui-form-item">
                <label class="layui-form-label"><fmt:message key='zh'/></label>
                <div class="layui-input-inline">
                    <form:input path="username" class="layui-input" readonly="true"/>
                    <input type="hidden" id="hiddenId" value="0"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><fmt:message key='xm'/></label>
                <div class="layui-input-inline">
                    <form:input path="realName" class="layui-input"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><fmt:message key='sj3'/></label>
                <div class="layui-input-inline">
                    <form:input path="mobile" class="layui-input"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><fmt:message key='yx'/></label>
                <div class="layui-input-inline">
                    <form:input path="mail" class="layui-input"/>
                </div>
            </div>

            <div class="layui-input-block">
                <input type="button" value="<fmt:message key='xgxx'/>" class="layui-btn layui-btn-normal" id="submit">
            </div>

        </form:form>
    </div>

<script>
    $(function () {
        $("#submit").click(function () {

            $("form").ajaxSubmit({
                success: function (result) {
                    if (result.status) {
                        alert("<fmt:message key='xgxxcg'/>");
                        location.reload();
                    } else {
                        alert(result.message);
                    }
                }
            });
        });
    });
</script>
</body>
</fmt:bundle>
</html>